pgplot/sys_osf1

This directory is for the OSF/1 or Digital UNIX (e.g., DEC/AXP)
version of PGPLOT.  Version 5.0 of PGPLOT has not yet been tested on
this system. The file f77_cc.conf for use with the makemake procedure
is based on information received from Magnus Harlander
(harlan@Physik.TU-Muenchen.DE) and Jean-Louis Oneto (OCA-CERGA,
Grasse, France; oneto@ocar01.obs-azur.fr), but may require
modification.

The file f77_cc_shared.conf includes instructions for building a
shared library, based on information received from Robin Williams
(rjrw@ast.man.ac.uk). I have not tested it.

64-BIT ADDRESSES

Some of the PGPLOT device drivers use dynamic memory allocation and
the non-standard %VAL() mechanism for passing the address of the
dynamically allocated memory to a subroutine. This assumes that an
address can be stored in an INTEGER variable, which is not true for
this operating system. To use these drivers, you must edit the source
code to change the data type for address variables from INTEGER to
INTEGER*8.  Comments in gidriv.f, ppdriv.f, wddriv.f indicate which
variables must be changed. I hope to devise a more portable way of
handling this problem in a future version of PGPLOT.

OPERATING SYSTEM BUG

Some users have reported the following problem:
>  f77 -assume backslash -o pgdemo1 /usrdevel/osf1/huangch/OSF1_working/pgplot/
>   examples/pgdemo1.f -L`pwd` -lpgplot -lX11
> > Assertion failed: 0, file ../../../../../../src/usr/ccs/lib/libmld/cmrlc_pr
>   oduce.c, line 864
> > Fatal error in: /usr/lib/cmplrs/cc/ld IOT/Abort trap - core dumped
> > fort: Severe: Failed while trying to link.
> > *** Exit 1
> > Stop.

This occurs with OSF/1 V3.2. Call your customer service representative
and ask for patch ID OSF320-094.  This will provide you with a new
linker that solves the problem. A workaround is to disable optimization
during compilation.

The problem occurs only with the non-shared version (f77_cc.conf, not
f77_cc_shared.conf).

LD_LIBRARY_PATH

When running a PGPLOT program, you will probably need to add the directory
containing the PGPLOT shared library to the LD_LIBRARY_PATH, e.g., in
~/.cshrc add the statement
 
  setenv LD_LIBRARY_PATH /usr/local/pgplot

where "/usr/local/pgplot" is the path to the pgplot libraries
libpgplot.a, and libpgplot.so; the system complains if it cannot find
the shared library (*.so).

LINKING PGPLOT WITH A C PROGRAM

With the supplied installation procedure, Cpgdemo does not link on OSF/1.

  cc -DPG_PPU -c -I. /home/pmc/src/pgplot_5.0/pgplot/cpg/cpgdemo.c
  f77 -o cpgdemo cpgdemo.o -L`pwd` -lcpgplot -lpgplot -lX11
  ld:
  cpgdemo.o: main: multiply defined
  Unresolved:
  MAIN__
  fort: Severe: Failed while trying to link.

The best solution to this is to use the flag -nofor_main on the f77
command used to link the program (thanks to David Terrett). I will try
to add this in a future version of PGPLOT. An alternative suggestion,
from Will Deich: ``C programs that call Fortran routines have to be
linked by using the C compiler to invoke ld, NOT the Fortran compiler.
(This is counter to most other Unix's.)  Of course, if you are using
the C compiler to invoke ld, it is possible that some necessary
Fortran libraries aren't automatically linked in.''  Some of the
libraries needed are -lUil -lots -lm.
 
Please send any updates or corrections to me.

Tim Pearson
2 January 1996
